package com.nekonomics
package types

import doobie.Meta

enum PaymentMethod {
  case AliPay
}

object PaymentMethod {
  given Meta[PaymentMethod] = Meta[String]
    .timap {
      case "ali_pay" => PaymentMethod.AliPay
      case _ => throw new Exception("Invalid payment method")
    } {
      case PaymentMethod.AliPay => "ali_pay"
    }
}